package com.minigame.card.paper.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum PaperCard {
    S('上', true, true, 0, 1),
    D('大', true, false, 1, 1),
    R('人', true, false, 2, 1),
    Q('丘', false, true, 3, 2),
    Y('乙', false, false, 4, 2),
    J('己', false, false, 5, 2),
    H('化', false, true, 6, 3),
    SA('三', false, false, 7, 3),
    QIA('千', false, false, 8, 3),
    QI('七', false, true, 9, 4),
    SH('十', false, false, 10, 4),
    SHI('士', false, false, 11, 4),
    E('尔', false, false, 12, 5),
    X('小', false, false, 13, 5),
    SHE('生', false, false, 14, 5),
    B('八', false, false, 15, 6),
    JI('九', false, false, 16, 6),
    Z('子', false, false, 17, 6),
    JIA('佳', false, false, 18, 7),
    ZU('作', false, false, 19, 7),
    RE('仁', false, false, 20, 7),
    K('可', true, true, 21, 8),
    ZH('知', true, false, 22, 8),
    L('礼', true, false, 23, 8),
    ;
    private final char name;
    private final boolean red;
    private final boolean jin;
    private final int index;
    private final int group;
    public static PaperCard indexOf(int index) {
        for (PaperCard value : values()) {
            if (value.index == index) {
                return value;
            }
        }
        return null;
    }
}
